<%-- 
    Document   : AdminDashboard
    Created on : Feb 22, 2014, 10:39:07 AM
    Author     : Mukesh
--%>

<%@page import="java.util.Iterator"%>
<%@page import="java.util.Vector"%>
<%@page import="Course.CourseBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    try {
        if (session.getAttribute("uid") != null) {
            if (session.getAttribute("Salary_Component").toString().equals("1")) {
%>
<html>
    <head>
        <title>Ramgovind Automated System</title>

        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap-responsive.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/style.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        <script src="../../ajax/ajax.js"></script>

    </head>
    <body>
        <%@include file="/topheader.html" %>
        <%@include file="/settingheader.html" %>
        <div class="main">
            <div class="container-fluid">

                <%@include file="/Settings/dbsidenav.html" %>
                <div class="content">
                    
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="box">
                                <div class="box-head">
                                    <h3>Edit Subject</h3>
                                    <a href="/RIT/Settings/Database/SalaryComponent.jsp">
                                        <button style="float: right" class="btn btn-success">View Salary Component</button>
                                    </a>
                                </div>
                                <div class="box-content">
                                    <!---Form Start....-->
                                    <%{if(request.getParameter("id")!=null){%>
                                    <form action="/RIT/EditSalaryComponent" method="post" class='validate form-horizontal'>
                                        <div class="control-group">
                                            <label for="empName" class="control-label">Salary Component</label>
                                            <div class="controls">
                                                <input type="text" name="salName" id="salName" value="<%=request.getParameter("component") %>">
                                                <input type="hidden" name="id" value="<%=request.getParameter("id") %>">
                                            </div>
                                        </div>

                                        <div class="control-group">
                                            <label for="radio2" class="control-label">Salary Type</label>
                                            <div class="controls">
                                                <label class="radio" style="float: left;"><input type="radio" name="salType" value="1" <%if(request.getParameter("salType").equals("1")){%> checked<%}%>>Earning</label>
                                                <label class="radio" style="float: left;padding-top: 5px; padding-left: 100px;"><input type="radio" name="salType" value="2" <%if(request.getParameter("salType").equals("2")){%> checked<%}%>>Deduction</label>
                                            </div>
                                        </div>

                                        <div class="control-group">
                                            <label for="radio2" class="control-label">Value Type</label>
                                            <div class="controls">
                                                <label class="radio" style="float: left;"><input type="radio" name="valType" value="1" <%if(request.getParameter("valType").equals("1")){%> checked<%}%>>Percentage(%)</label>
                                                <label class="radio" style="float: left;padding-top: 5px; padding-left: 59px;"><input type="radio" name="valType" value="2" <%if(request.getParameter("valType").equals("2")){%> checked<%}%>>Amount</label>
                                            </div>
                                        </div>
                                        <div class="form-actions">
                                            <input type="submit" value="Update" class='btn btn-primary'>
                                        </div>
                                        <%}}%>
                                    </form>
                                    <!---Form Ends....-->
                                </div>
                            </div>
                        </div>
                    </div>

                </div>	
            </div>
        </div>

        <script src="/RIT/js/jquery.js"></script>
        <script src="/RIT/js/less.js"></script>
        <script src="/RIT/js/bootstrap.min.js"></script>
        <script src="/RIT/js/jquery.uniform.min.js"></script>
        <script src="/RIT/js/bootstrap.timepicker.js"></script>
        <script src="/RIT/js/bootstrap.datepicker.js"></script>
        <script src="/RIT/js/chosen.jquery.min.js"></script>
        <script src="/RIT/js/jquery.fancybox.js"></script>
        <script src="/RIT/js/plupload/plupload.full.js"></script>
        <script src="/RIT/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
        <script src="/RIT/js/jquery.cleditor.min.js"></script>
        <script src="/RIT/js/jquery.inputmask.min.js"></script>
        <script src="/RIT/js/jquery.tagsinput.min.js"></script>
        <script src="/RIT/js/jquery.mousewheel.js"></script>
        <script src="/RIT/js/jquery.textareaCounter.plugin.js"></script>
        <script src="/RIT/js/ui.spinner.js"></script>
        <script src="/RIT/js/jquery.jgrowl_minimized.js"></script>
        <script src="/RIT/js/jquery.form.js"></script>
        <script src="/RIT/js/jquery.validate.min.js"></script>
        <script src="/RIT/js/bbq.js"></script>
        <script src="/RIT/js/jquery-ui-1.8.22.custom.min.js"></script>
        <script src="/RIT/js/jquery.form.wizard-min.js"></script>
        <script src="/RIT/js/jquery.cookie.js"></script>
        <script src="/RIT/js/jquery.metadata.js"></script>
        <script src="/RIT/js/custom.js"></script><script src="/RIT/js/demo.js"></script>
        <script src="/RIT/js/iconfont.js"></script>
    </body>
</html>

<%} else {
%>
<script type="text/javascript">
    alert("You Are Not Authorised");
    window.history.back();
</script>
<%             }
        } else {
            request.setAttribute("msg", "You Are Not Authorised! Please Contact to System Administrator!");
            request.setAttribute("value", "0");
            getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        }
    } catch (Exception e) {
        request.setAttribute("msg", "Please Contact to System Administrator!");
        request.setAttribute("value", "0");
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
    }
%>
